class MalwareDetector:
    def __init__(self, config):
        """支持多模型加载"""
        self.models = {
            'rf': load_model(config['rf_path']),
            'cnn': load_model(config['cnn_path'])
        }
    
    def ensemble_predict(self, features):
        """集成模型预测"""
        predictions = [model.predict(features) for model in self.models.values()]
        return majority_vote(predictions) 